package org.zhou.pojo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;


@Data
public class Administrator {
    private Integer id;
    @NotEmpty
    @Pattern(regexp = "^\\S{2,10}$")
    private String name;
    @NotEmpty
    @Pattern(regexp = "^\\S{5,20}$")
    private String username;
    @Pattern(regexp = "^(?:(?:\\+|00)86)?1(?:(?:3[\\d])|(?:4[5-7|9])|(?:5[0-3|5-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\\d])|(?:9[1|8|9]))\\d{8}$")
    private String phone;
    @JsonIgnore  //让springmvc把当前对象转换成json字符申的时候，忽路password,最终的json字符申中就没有password这个属性了
    private String password;
    private Integer status;
}
